﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Message.aspx.cs" Inherits="admin_Message_Message" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
       <script type="text/javascript" src="../../../js/jquery.js"></script>

<body>
    <form id="form1" runat="server">
        <div>
            <table border="0" style="width: 90%">
                <tr>
                    <td style="height: 26px">
                        &nbsp;
                        <asp:TextBox ID="txtMessage" runat="server" ToolTip="请输入留言" Width="83px"></asp:TextBox>
                        <asp:DropDownList ID="dropMessageState" runat="server">
                            <asp:ListItem Selected="True">留言状态</asp:ListItem>
                            <asp:ListItem Value="0">新留言</asp:ListItem>
                            <asp:ListItem Value="1">已阅读</asp:ListItem>
                            <asp:ListItem Value="2">已回复</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="dropMessageDate" runat="server">
                            <asp:ListItem Value="七天内的留言">七天内的留言</asp:ListItem>
                            <asp:ListItem Value="一个月内的留言">一个月内的留言</asp:ListItem>
                            <asp:ListItem Value="三个月内的留言" Selected="True">三个月内的留言</asp:ListItem>
                            <asp:ListItem Value="三个月以上留言">三个月以上留言</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="查询" /></td>
                </tr>
                <tr>
                    <td style="width: 100%">
                        <asp:GridView ID="grdMessage" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            ForeColor="#333333" GridLines="None" DataKeyNames="ID" AllowPaging="True" OnPageIndexChanging="grdMessage_PageIndexChanging" OnRowDataBound="grdMessage_RowDataBound1">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="留言人">
                                    <ItemTemplate>
                                        <%# GetMessagePeople(Eval("LoginName").ToString())%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Title" HeaderText="留言标题" />
                                <asp:TemplateField HeaderText="留言标题">
                                    <ItemTemplate>
                                           <a href='MessageDetail.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>
                                            <%# DataBinder.Eval(Container.DataItem,"Title") %>
                                        </a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="状态">
                                    <ItemTemplate>
                                        <%# GetCharacter(Eval("Restore").ToString())%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="留言日期">
                                    <ItemTemplate>
                                        <%# GetShortDate(DataBinder.Eval(Container.DataItem, "Date").ToString())%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td style="width: 100%">
                        <input id="CheckBox2" name="CheckBox2" type="checkbox" onclick="SelectAll();" />
                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" Text="删除" OnClick="btnDelete_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
